from threading import Thread
from time import sleep


def func(name):
    for i in range(3):
        print(f"{name}的第{i}次执行")
        sleep(1)


if __name__ == '__main__':
    print('----主线程启动----')
    t1 = Thread(target=func, args=('t1',))
    t2 = Thread(target=func, args=('t2',))
    t1.start()
    t2.start()
    print('----主线程结束----')